﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using F2S.LINQ2LinkedIn.Model;
using F2S.oAuth;

namespace F2S.LINQ2LinkedIn.Client.Services
{
    public enum StatusEventCode
    {
        Initializing,
        Initialized,
    }

    public class StatusEvent : EventArgs
    {
        public StatusEventCode Code { get; private set; }

        public StatusEvent(StatusEventCode code)
        {
            Code = code;
        }
    }

    public enum LinkedInStatus
    {
        Initializing,
        LoggedIn,
        RequiresAuthorization
    }

    public interface ILinkedInService
    {
        event EventHandler<StatusEvent> StatusEvent;

        bool IsLoggedIn { get; }
        bool RequiresAuthorization { get; }
        LinkedInStatus Status { get; }

        Task<InitializationResult> Initialize();
        Task<AuthorizationResult> Authorize();

        Task<OAuthExecutionResult<UpdateResponse>> GetNetworkUpdates(
            Scope scope = Scope.Network,
            NetworkUpdateTypes networkUpdateTypes = NetworkUpdateTypes.Unspecified,
            int count = -1,
            int start = -1,
            int after = -1,
            int before = -1,
            bool showHiddenMembers = false);
    }
}
